package gui.lesson01;

import java.awt.*;

public class TestFlowLayout {
    public static void main(String[] args) {
        Frame frame = new Frame();
        Button button = new Button("button1");
        Button button1 = new Button("button2");
        Button button2 = new Button("button3");
        //设置为流式布局（Flowlayout）
        frame.setLayout(new FlowLayout(FlowLayout.LEFT,10,10));
        frame.setSize(200,200);
        //把按钮添加上去
        frame.add(button);
        frame.add(button1);
        frame.add(button2);
        frame.setVisible(true);
    }
}
